This invention relates to an efficient encoding apparatus adapted for efficiently encoding an image signal with a less quantity of codes and a decoding apparatus adapted for decoding such a coded signal in a processing system for recording, transmitting, and displaying a digital signal.
As an efficient coding technique utilizing image correlation, a "predictive coding" technology and a "orthogonal transform" technology are known as a most popular technology in recent years. In encoding a moving picture, the "prediction coding" technology is used for the interframe processing, and the "orthogonal transform" technology is used for the intraframe processing. Further, in the interframe prediction, there are many instances where a "motion compensation" to vary a predictive signal in correspondence with motion of a picture is carried out, and an orthogonally transformed and quantized predictive residual signal is replaced by a "variable length code".
A coding apparatus and a decoding apparatus in this case will be described.
FIG. 1 is a block diagram showing a conventional coding apparatus.
In FIG. 1, an original image signal inputted from an image input terminal 1 is delivered to a subtracter 2 and a motion vector detector 3. The subtracter 2 subtracts a predictive signal which will be described later from the original image signal to provide a predictive residual to deliver it to an orthogonal transformer or transform element 4. The orthogonal transformer 4 orthogonally transforms this predictive residual every block consisting of 8.times.8 pixels or so by the Discrete Cosine Transform (DCT) technique, etc. to deliver it to a quantizer 5. The quantizer 5 quantizes an input signal with a suitable accuracy. Since most of input signals take a value originally nearly equal to zero, most of output signals from the quantizer 5 also take zero.
An output signal from the quantizer 5 is delivered to a variable length encoder 6 and an inverse-quantizer 7. The variable length encoder 6 effect a processing such that when the input signal is equal zero, the encoder 6 converts the number of succession of signals to a variable length code such as a Huffman code, etc., and when the input signal takes a value except for zero, the encoder 6 converts that value to a variable length code, thereafter to deliver the variable length code thus obtained to a buffer 8 as compressed data. At this time, the rate of data outputted from the variable length encoder 6 is not fixed. Accordingly, that data is delivered to the buffer 8 so that it has a fixed rate. The data passed through the buffer 8 is outputted from a compressed data output terminal 9 to a decoding apparatus side.
On the other hand, a predictive signal delivered to the subtracter 2 is a signal earlier by one frame. In order to allow this predictive signal to be the same as that on the decoding apparatus side, this predictive signal is processed as follows.
The inverse-quantizer 7 inverse-quantizes a quantized signal which is an output signal of the quantizer 5 to replace it by a representative value of quantization to deliver it to an inverse orthogonal transformer 10. The inverse-orthogonal transformer 10 carries out an inverse transform processing of the orthogonal transformation to deliver its output signal to an adder 11. The adder 11 adds an output signal from the inverse orthogonal transformer 10 and a predictive signal delivered from a terminal 12c of a changeover switch 12 to provide the signal thus added as a reproduced image signal to deliver it to a frame memory 13. The frame memory 13 delays the reproduced image signal by one frame thereafter to deliver it to the motion vector detector 3 and a motion compensator 14.
The motion vector detector 3 searches motion of an image every about 16.times.16 pixels between an original image signal from the image input terminal 1 and a signal earlier by one frame from the frame memory 13 to obtain most accurate information to transmit it to the decoding apparatus side through a motion vector information output terminal 15, and to deliver it also to the motion compensator 14.
The motion compensator 14 implements a motion compensative processing to an output signal from the frame memory 13 in correspondence with a motion vector value delivered from the motion vector detector 3 to obtain a predictive signal to deliver it as a subtraction signal to the subtracter 2 through terminals 12b and 12c of the changeover switch 12.
The changeover switch 12 serves to ensure a suitable interframe prediction. The operation of the changeover switch 12 will now be described.
The motion vector detector 3 is adapted to output independent information for independently making coding without carrying out prediction in the case where a matching error between frames is large even if a motion vector is considered to be optimum to transmit such independent information to the decoding apparatus side through an independent information output terminal 16, and to deliver it also to the changeover switch 12.
The changeover switch 12 is switched, by this independent information, not to the 12b side (output of the motion compensator 14), but to a fixed value (0) on the 12a side, thus to inhibit interframe prediction.
FIG. 2 is a block diagram showing a conventional decoding apparatus.
In FIG. 2, compressed data transmitted from the coding apparatus side shown in FIG. 1 is incoming through a compressed data input terminal 17 and a buffer 18, and is then delivered to a variable length decoder 19. The variable length decoder 19 converts a variable length code of the compressed data to a fixed length to deliver it to an inverse-quantizer 20. The inverse quantizer 20 inverse-quantizes an input signal to deliver it to an inverse orthogonal transformer 21.
The inverse-orthogonal transformer 21 implements an inverse orthogonal transform processing to that input signal to obtain a predictive residual signal to deliver it to an adder 22. The adder 22 adds the reproduced predictive residual signal and a predictive signal delivered from a changeover switch 23 to obtain a reproduced image signal to output it through a reproduced image output terminal 24, and to deliver it also to a frame memory 25.
The frame memory 25 delays the reproduced image signal by one frame thereafter to deliver it to a motion compensator 26. The motion compensator 26 carries out motion compensation of the reproduced image signal by motion vector information transmitted from the coding apparatus side through a motion vector information input terminal 27 to obtain a predictive signal to deliver it as an addition signal to the adder 22 through terminals 23b and 23c of the changeover switch 23.
Further, the changeover switch 23 is switched, by independent information transmitted from the coding apparatus side through an independent input terminal 28, not to the 23b side (output of the motion compensator 26), but to the fixed value (0) on the 23a side, thus to inhibit interframe prediction.
As an actual example of the previously described coding and decoding apparatuses standardized (H. 261) for use in a Television Conference, or a Television Telephone in the Consultive Committee of International Telegram & Telephone (CCITT).
In an interframe predictive coding as described above, the efficiency is high because correlation between frames is effectively utilized. However, in order to realize application to storage (recording) system media, it is required for carrying out random access, high speed search or image editing to independently conduct coding within a frame without using prediction between several frames.
While an employment of an increased rate of frames caused to be independent becomes easy to cope with editing, etc. by the increased rate, the efficiency is lowered, so that a quantity of codes generated increases. Particularly, when an attempt is made to carry out editing every one frame (replacement of image), it is necessary that respective frames are independent, giving rise to inconveniences such that the interframe prediction is unable to be used.
Further, in the case of the interframe predictive processing, when an image correlation between frames is lowered to some extent, a quantity of codes of predictive residuals can become greater than that in the case where coding is independently carried out within a frame without using prediction. For this reason, there are instance where a method of independently carrying out coding within a frame is rather desirable. In these instances, it took place the inconvenience that it is necessary to make the respective characteristics of the intraframe coding with respect to a predictive residual and a raw image to be different from each other.